package net.koodar.forge.business.category.manager;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import net.koodar.forge.business.category.dao.CategoryAttributeMapper;
import net.koodar.forge.business.category.model.entity.CategoryAttribute;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author liyc
 */
@Service
public class CategoryAttributeManager extends ServiceImpl<CategoryAttributeMapper, CategoryAttribute> {

    public List<CategoryAttribute> findByCategoryId(Long categoryId) {
        return baseMapper.selectList(Wrappers.<CategoryAttribute>lambdaQuery().eq(CategoryAttribute::getCategoryId, categoryId));
    }
}
